3.2404 \(\int \frac{x (1+x)^2}{\left (1+x+x^2\right )^3} \, dx\)

Optimal. Leaf size=33 \[ -\frac{(x+1) (2 x+1)}{6 \left (x^2+x+1\right )^2}-\frac{1}{6 \left (x^2+x+1\right )} \]

[Out]

-((1 + x)*(1 + 2*x))/(6*(1 + x + x^2)^2) - 1/(6*(1 + x + x^2))

_______________________________________________________________________________________

Rubi [A]  time = 0.0412836, antiderivative size = 33, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133 \[ -\frac{(x+1) (2 x+1)}{6 \left (x^2+x+1\right )^2}-\frac{1}{6 \left (x^2+x+1\right )} \]

Antiderivative was successfully verified.

[In]  Int[(x*(1 + x)^2)/(1 + x + x^2)^3,x]

[Out]

-((1 + x)*(1 + 2*x))/(6*(1 + x + x^2)^2) - 1/(6*(1 + x + x^2))

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 7.33233, size = 31, normalized size = 0.94 \[ - \frac{\left (x + 1\right ) \left (2 x + 1\right )}{6 \left (x^{2} + x + 1\right )^{2}} - \frac{1}{6 \left (x^{2} + x + 1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x*(1+x)**2/(x**2+x+1)**3,x)

[Out]

-(x + 1)*(2*x + 1)/(6*(x**2 + x + 1)**2) - 1/(6*(x**2 + x + 1))

_______________________________________________________________________________________

Mathematica [A]  time = 0.0151992, size = 22, normalized size = 0.67 \[ -\frac{3 x^2+4 x+2}{6 \left (x^2+x+1\right )^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(x*(1 + x)^2)/(1 + x + x^2)^3,x]

[Out]

-(2 + 4*x + 3*x^2)/(6*(1 + x + x^2)^2)

_______________________________________________________________________________________

Maple [A]  time = 0.04, size = 20, normalized size = 0.6 \[{\frac{1}{ \left ({x}^{2}+x+1 \right ) ^{2}} \left ( -{\frac{{x}^{2}}{2}}-{\frac{2\,x}{3}}-{\frac{1}{3}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x*(1+x)^2/(x^2+x+1)^3,x)

[Out]

(-1/2*x^2-2/3*x-1/3)/(x^2+x+1)^2

_______________________________________________________________________________________

Maxima [A]  time = 0.695562, size = 43, normalized size = 1.3 \[ -\frac{3 \, x^{2} + 4 \, x + 2}{6 \,{\left (x^{4} + 2 \, x^{3} + 3 \, x^{2} + 2 \, x + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 1)^2*x/(x^2 + x + 1)^3,x, algorithm="maxima")

[Out]

-1/6*(3*x^2 + 4*x + 2)/(x^4 + 2*x^3 + 3*x^2 + 2*x + 1)

_______________________________________________________________________________________

Fricas [A]  time = 0.254198, size = 43, normalized size = 1.3 \[ -\frac{3 \, x^{2} + 4 \, x + 2}{6 \,{\left (x^{4} + 2 \, x^{3} + 3 \, x^{2} + 2 \, x + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 1)^2*x/(x^2 + x + 1)^3,x, algorithm="fricas")

[Out]

-1/6*(3*x^2 + 4*x + 2)/(x^4 + 2*x^3 + 3*x^2 + 2*x + 1)

_______________________________________________________________________________________

Sympy [A]  time = 0.320285, size = 31, normalized size = 0.94 \[ - \frac{3 x^{2} + 4 x + 2}{6 x^{4} + 12 x^{3} + 18 x^{2} + 12 x + 6} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x*(1+x)**2/(x**2+x+1)**3,x)

[Out]

-(3*x**2 + 4*x + 2)/(6*x**4 + 12*x**3 + 18*x**2 + 12*x + 6)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.26642, size = 27, normalized size = 0.82 \[ -\frac{3 \, x^{2} + 4 \, x + 2}{6 \,{\left (x^{2} + x + 1\right )}^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 1)^2*x/(x^2 + x + 1)^3,x, algorithm="giac")

[Out]

-1/6*(3*x^2 + 4*x + 2)/(x^2 + x + 1)^2